﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel.Description;

namespace Pg.BioMedics.SDR.ServiceAgents
{
    /// <summary>
    /// Security strategy based on Windows Integrated Authentication 
    /// mechanism
    /// </summary>
    internal class WindowsSecurityStrategy : ISecurityStrategy
    {
        #region ISecurityStrategy Members

        /// <summary>
        /// Applies imporsonation level to remote service connection
        /// </summary>
        /// <param name="credentials"></param>
        public void ApplyCredentials(ClientCredentials credentials)
        {
            credentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
        }

        #endregion
    }
}
